package com.iwinding.ladygg.bluetooth.task;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by hezhiyong on 2017/5/15.
 */

public class AutoTask {

    public static AutoTask instance;
    public static Timer mTimer;

    public static AutoTask getInstance(){
        if(instance == null){
            instance = new AutoTask();
        }
        return instance;
    }

    private AutoTask(){
        mTimer = new Timer();
    }

    public void runTask(TimerTask task){
        mTimer.schedule(task,0);
    }

}
